home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Behavior Library.cst / 00005_Go to Previous Marker.ls < prev    next >
Encoding:
Text File  |  1997-05-09  |  1.2 KB  |  59 lines

  1. -- Marker  Go to Previous 
  2.  
  3.  
  4. --  nav
  5. --  goes to previous marker on author selected event
  6. -- also functions through lingo by handling message 'initGotoPreviousMarker', 
  7. -- for example if this behavior was assigned to sprite 5, use
  8. -- sendsprite 5, #initGotoPreviousMarker
  9.  
  10. property whichEvent
  11.  
  12. on initGotoPreviousMarker me
  13.   init me
  14. end
  15.  
  16. on mouseUp me
  17.   if whichEvent = #mouseup    then init me
  18. end
  19.  
  20. on prepareFrame me
  21.   if whichEvent = #prepareframe then init me
  22. end
  23.  
  24. on exitFrame me
  25.   if whichEvent = #exitframe  then init me
  26. end
  27.  
  28. on init me 
  29.  
  30.     go to marker (-1)
  31.  
  32.   
  33. end
  34.  
  35.  
  36.  
  37. ---
  38.  
  39. on getPropertyDescriptionList
  40.   
  41.   set p_list = [ ┬¼
  42.     #WhichEvent: [ #comment:  "Initializing Event:", ┬¼
  43.                     #format:   #symbol, ┬¼
  44.                      #range: [ #MouseUp, #PrepareFrame, #ExitFrame, #InitGotoPreviousMarker], ┬¼
  45.                    #default:   #MouseUp ] ┬¼
  46.                  ]
  47.   return p_list  
  48.   
  49. end
  50.  
  51. on getBehaviorDescription
  52.   return ┬¼
  53. "Moves the Playback Head to the previous marker when the specified event occurs.  Drag to a sprite or a frame in the script channel." && RETURN & ┬¼
  54. "PARAMETERS:" && RETURN & ┬¼
  55. "ΓÇó Initializing Event - Specify the event that triggers the behavior."
  56.   
  57. end
  58.  
  59.